<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="style/admin.css" />
<link rel="stylesheet" type="text/css" href="style/global.css" />
<link rel="stylesheet" type="text/css" href="style/tip.css" />
<title>咨询反馈</title>
</head>
<body>
<div id="wrap">
<div id="public_head"></div>
       		<input class="btn_add btn_search_add" name="" type="button"
	value="" onclick="/index.php?c=role&a=add" />
        <div class="m_content">
<table class="qi_table" width="0" border="0" cellpadding="0"
	cellspacing="1">
	<tr>
		<th>用户组名称</th>
		<th>用户数</th>
		<th>管理</th>
	</tr>
        <?php 
        	if(is_array($groups) && count($groups)>0){
        		foreach ($groups as $v){
        ?>
    <tr>
		<td><?php echo $v ['ROLE_NAME']?></td>
		<td><?php echo $v['NUMS']?$v['NUMS']:0?>&nbsp;（人）</td>
		<td>
			<a href="/index.php?c=user&a=index&grade=<?php echo $v['ROLE_ID']?>">查看用户</a> 
			<a href="/index.php?c=role&a=add&id=<?php echo $v['ROLE_ID']?>">修改</a> 
			<a href="" class="delrole" pid="<?php echo $v['ROLE_ID']?>">删除</a>
		</td>
	</tr>
        <?php 
        		}
        	}else{
        ?>
        	<tr>
		<td style="text-align: center; color: green;" colspan='10'>没有您搜索的结果</td>
	</tr>
        <?php }?>
            </table>
</div>
</div>
</body>
</html>
<script src="/js/xheditor/jquery/jquery-1.4.4.min.js"
	type="text/javascript"></script>
<script src="/js/boot.js" type="text/javascript"></script>
<script src="/js/tip.js" type="text/javascript"></script>
<script src="/js/add_public_head.js" type="text/javascript"></script>
<script type="text/javascript">
$('input.btn_search_add').click(function(){
	location.href="/index.php?c=role&a=add";
})
$('.delrole').click(function(){
	if(T.confirm('确认删除吗')){
		var t = this;
		$.ajax({
			url:'/index.php?c=role&a=del&id='+$(t).attr('pid'),
			dateType:'json',
			type:'get',
			success:function(de){
				T.addtip($(t),lang[de.msg])
				location.reload();
			}
		})
	}
	return false
})

</script>